var mongoose = require('mongoose');

mongoose.connect('mongodb://localhost/xiangmu').then(()=>{
    console.log('数据库连接成功！');
}).catch(err=>{
   console.log('数据库连接失败！', err);
})


var orderSchema = new mongoose.Schema({
    date:String,
   
    orders: [{
        img:String,
        id: String,
        service: String,
        provider: String,
        customer: String,
        status: { type: String, default: 'pending' },
    }],
   
})

var Order = mongoose.model('Order', orderSchema);



module.exports={
    Order
}